package com.inoneone.youba.mcht.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.inoneone.toolkit.exception.BusinessRuntimeException;
import com.inoneone.youba.mcht.cache.mapper.MobileIntervalMapper;
import com.inoneone.youba.mcht.cache.po.MobileIntervalPo;
import com.inoneone.youba.mcht.dao.mapper.AnnouncementMapper;
import com.inoneone.youba.mcht.dao.po.Announcement;
import com.inoneone.youba.mcht.dao.po.AnnouncementExample;
import com.inoneone.youba.mcht.dto.PageRsp;
import com.inoneone.youba.mcht.dto.req.AnnounceDetailReq;
import com.inoneone.youba.mcht.dto.req.AnnounceListReq;
import com.inoneone.youba.mcht.dto.rsp.AnnounceDetailRsp;
import com.inoneone.youba.mcht.dto.rsp.AnnounceListRsp;
import com.inoneone.youba.mcht.enums.Constants;
import com.inoneone.youba.mcht.enums.ErrorCode;
import com.inoneone.youba.mcht.service.AnnouncementApi;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class CommonServiceImpl{

    @Autowired
    MobileIntervalMapper mobileIntervalMapper;

    /**
     * Description: 校验短信验证码发送间隔</br>
     * Date: 2017-09-13 10:26:03</br>
     *
     * @param
     * @return
     * @author 姬远玄
     * @since JDK 1.7
    */
    public void checkSmsCodeInterVal(String mobile)
    {

//        MobileIntervalPo mobileIntervalPo = mobileIntervalMapper.select(Constants.FIND_PAY_PWD + mobile);
//        if(System.currentTimeMillis() < mobileIntervalPo.getSendTime() + valueConfig.getMobileIntervalSec() * 1000)
//        {
//            throw new BusinessRuntimeException(ErrorCode.MOIBLE_INTERVAL);
//        }
    }

}
